﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Class2
    {            //分别计算圆面积和长方形面积两个方法。
                 //提示：计算圆的面积传半径，计算长方形面积传长和宽。
        public double na;
        public double nb;
        public Class2(double Na) {
            this.na = Na;
        }
        public Class2(double Na, double Nb)
        {
            this.na = Na;
            this.nb = Nb;
        }
        public void Nv() {
            Console.WriteLine("圆的面积是"+(3.14*na*na));
        }
        public void Nc()
        {
            Console.WriteLine("长方形面积"+(na*nb));
        }
    }
}
